import { CHANGE_INPUT, ADD_ITEM, DELETE_ITEM, CTRL_Z, CTRL_Y } from "./actionTypes";

// 输入框
export const changeInputAction = (value) => ({
    type: CHANGE_INPUT,
    value
});

// 添加
export const addItemAction = () => ({
    type: ADD_ITEM
});

// 删除
export const deleteItemAction = (index) => ({
    type: DELETE_ITEM,
    index
});

// 撤销
export const ctrlzAction = () => ({
    type: CTRL_Z
});

// 重做/还原
export const ctrlyAction = () => ({
    type: CTRL_Y
});